﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Reporting.WebForms;

namespace QSHC.QSchedule.Report
{
    public class ReportManager
    {
        public static void PrintReport(ReportViewer reportViewer, object data)
        {
            //provide local report information to viewer
            reportViewer.LocalReport.ReportEmbeddedResource = "QSHC.QSchedule.Report.Reports.Appointment.rdlc";

            //prepare report data source
            ReportDataSource rds = new ReportDataSource();
            rds.Name = "AppointmentDataSet";
            rds.Value = data;

            reportViewer.LocalReport.DataSources.Add(rds);
        }
    }
}
